package com.simple.common;

/**
 * <p>
 * <br/>常量部分， 根据实际业务需要定义
 * </p>
 *
 */
public class Constant {
    public static final String UPLOAD = "upload";

    public static final String USERNAME = "username";

    //授权key
    public static final String AUTH_KEY = "authKey";
    public static final String TOKEN = "token";

    //sessoinid
    public static final String SESSION_ID = "sessionId";
    public static final String HTTP_PREFIX = "http://";
    public static final String HTTPS_PREFIX = "https://";

    public static final String OK = "ok";

    /**
     * 加密算法
     */
    public static final String SHA1 = "SHA-1";
    public static final String MD5 = "MD5";
    public static final String AES = "AES";

    /**
     * 散列算法迭代次数
     */
    public static int SHA_ITERATION_NUM = 1024;

    /**
     * 盐大小
     */
    public static int SALT_SIZE = 8;

    /**
     * 默认提示消息
     */
    public static final String DEFAULT_MESSAGE = "操作成功";
    public static final String ERROR_MESSAGE = "操作失败";

    /**
     * 默认页
     */
    public static final int DEFAULT_PAGE = 1;

    /**
     * 默认页
     */
    public static final int DEFAULT_PAGE_ROWS = 20;

    /**
     * 字典缓存key
     */
    public static final String DICTIONARY_CACHE_KEY = "dictionariesCache";

    /**
     * 新闻中心相关常量
     */
    public static final String D_NEW_TYPE = "news";
    public static final int NEWS_DEFAULT_PAGE_ROWS = 5;
    public static final int NEWS_UP = 1;


    public static final String CACHE_DICTIONARY = "dictionariesCache";
    public static final String CACHE_DICTIONARY_ALL = "cache_dictionary";

    public static final String CACHE_NAVS = "navColumnCache";
    /**
     * 系统前端导航
     */
    public static final String CACHE_NAVS_ALL = "navs";

    public static final String FILE_SEPARATOR = "/";
    public static final String FILE_SUFFIX= ".";

    /**
     * 系统基础配置缓存
     */
    public static final String CACHE_CONFIG = "configCache";

    public static final String PAGE_ATTRIBUTE = "pageAttribute";
    /**
     * 首页默认新闻行数
     */
    public static final int DEFAULT_HOME_TOP_NEWS = 3;

    public static final int PARTNER_IS_NOT_SPECIAL= 0;
}
